package com.cqc.jdk8.Jnio.file.attribute;

import java.nio.file.FileVisitResult;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;

/**
 * @author cui
 * @date 2024/6/30 21:03
 * @description
 **/
public class MySimpleFileVisitor extends SimpleFileVisitor<Path> {

    private List<Path> result;

    public MySimpleFileVisitor(List<Path> result) {
        this.result = result;
    }

    @Override
    public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) {
        result.add(path);
        return FileVisitResult.CONTINUE;
    }
}
